
import 'package:flutter_network/service_method.dart';
import 'package:wallet_utils/report_widget/base/callback/base_callback.dart';
import 'package:wallet_utils/report_widget/base/callback/net_request_utils.dart';

import '../constant.dart';
import 'login_url.dart';

class LoginApi{
  //获取验证码
  static getSms(String mobile,BaseCallback callback) {
    Map<String, dynamic> paramsMap = {
      "mobile": mobile,
    };
    return NetRequestUtils.request(
        future: HttpRequest().requestPost(
          LoginUrl.h5SendCode,
          params: paramsMap,
        ),
        callback: callback);
  }

  static mobileLogin(String mobile,String verifyCode,BaseCallback callback) {
    Map<String, dynamic> paramsMap = {
      "mobile": mobile,
      'verifyCode':verifyCode,
      'scene': LoginScene().mobileVerifyLogin
    };
    return NetRequestUtils.request(
        future: HttpRequest().requestPost(
          LoginUrl.mobileLogin,
          params: paramsMap,
        ),
        callback: callback);
  }
}